package question

import "sort"

// 1637. 两点之间不包含任何点的最宽垂直区域
func maxWidthOfVerticalArea(points [][]int) int {
	sort.Slice(points, func(i, j int) bool {
		return points[i][0] < points[j][0]
	})
	max := 0
	for i := 0; i < len(points)-1; i++ {
		temp := points[i+1][0] - points[i][0]
		if max < temp {
			max = temp
		}
	}
	return max
}
